package com.zhongan.boot.listener;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.event.ApplicationStartingEvent;
import org.springframework.context.ApplicationListener;

/**
 * spring boot启动开始时执行的事件
 * 
 * @author chengkai
 *
 */
public class MyApplicationStartedEventListener implements ApplicationListener<ApplicationStartingEvent> {

	@Override
	public void onApplicationEvent(ApplicationStartingEvent event) {
		SpringApplication app = event.getSpringApplication();
		System.out.println("spring boot 启动监听" + app);
	}

}
